package com.ruoyi.project.gxgw_modules.discountManager.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 优惠券表 cxj_yhq
 *
 * @author zhy
 * @date 2019-01-16
 */
public class Yhq extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 优惠券id
     */
    @Excel(name = "优惠编号")
    private Integer yhqId;
    /**
     * 优惠券类型
     */
    @Excel(name = "优惠类型id")
    private Integer yhqType;
    /**
     * 优惠券数量
     */
    @Excel(name = "数量")
    private Integer yhqAmount;
    /**
     * 优惠券领取时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "优惠开始时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 优惠券失效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "优惠结束时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    /**
     * 优惠券使用时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date usedTime;
    /**
     * 优惠券状态
     */
    @Excel(name = "优惠状态", readConverterExp = "0=关闭,1=开启")
    private Integer yhqState;
    /**
     * 优惠券金额
     */
    @Excel(name = "折扣额")
    private Float yhqDiscount;
    /**
     * 优惠券删除状态
     */
    @JsonIgnore
    private String delFlag;
    /**
     * 优惠券时长
     */
    @Excel(name = "时长卡时长")
    private Float yhqHours;

    public Float getYhqHours() {
        return yhqHours;
    }

    public void setYhqHours(Float yhqHours) {
        this.yhqHours = yhqHours;
    }

    public void setYhqId(Integer yhqId) {
        this.yhqId = yhqId;
    }

    public Integer getYhqId() {
        return yhqId;
    }

    public void setYhqType(Integer yhqType) {
        this.yhqType = yhqType;
    }

    public Integer getYhqType() {
        return yhqType;
    }

    public void setYhqAmount(Integer yhqAmount) {
        this.yhqAmount = yhqAmount;
    }

    public Integer getYhqAmount() {
        return yhqAmount;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setUsedTime(Date usedTime) {
        this.usedTime = usedTime;
    }

    public Date getUsedTime() {
        return usedTime;
    }

    public void setYhqState(Integer yhqState) {
        this.yhqState = yhqState;
    }

    public Integer getYhqState() {
        return yhqState;
    }

    public void setYhqDiscount(Float yhqDiscount) {
        this.yhqDiscount = yhqDiscount;
    }

    public Float getYhqDiscount() {
        return yhqDiscount;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("yhqId", getYhqId())
                .append("yhqType", getYhqType())
                .append("yhqAmount", getYhqAmount())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("usedTime", getUsedTime())
                .append("yhqState", getYhqState())
                .append("yhqDiscount", getYhqDiscount())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
